package com.pubinfo.passbook.common.model.bo.passbook.medical;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import java.io.Serializable;

@Data
@NoArgsConstructor
@XmlAccessorType(XmlAccessType.FIELD)
public class Main {
  
  @ApiModelProperty("复核人")
  @XmlElement(name = "Checker")
  private String Checker;
  
  @ApiModelProperty("电子票据号码")
  @XmlElement(name = "EInvoiceNumber")
  private String EInvoiceNumber;
  
  @ApiModelProperty("电子票据监管机构代码")
  @XmlElement(name = "SupervisorAreaCode")
  private String SupervisorAreaCode;
  
  @ApiModelProperty("基本信息扩展")
  @XmlElement(name = "MainExt")
  private MainExt MainExt;
  
  @ApiModelProperty("开票日期")
  @XmlElement(name = "IssueDate")
  private String IssueDate;
  
  @ApiModelProperty("总金额")
  @XmlElement(name = "TotalAmount")
  private Double TotalAmount;
  
  @ApiModelProperty("校验码")
  @XmlElement(name = "RandomNumber")
  private String RandomNumber;
  
  @ApiModelProperty("备注")
  @XmlElement(name = "Remark")
  private String Remark;
  
  @ApiModelProperty("开票单位")
  @XmlElement(name = "InvoicingParty")
  private InvoicingParty InvoicingParty;
  
  @ApiModelProperty("开票时间")
  @XmlElement(name = "IssueTime")
  private String IssueTime;
  
  @ApiModelProperty("发票类型")
  @XmlElement(name = "PayerParty")
  private PayerParty PayerParty;
  
  @ApiModelProperty("交款方式")
  @XmlElement(name = "PayMode")
  private String PayMode;
  
  @ApiModelProperty("开票人")
  @XmlElement(name = "HandlingPerson")
  private String HandlingPerson;
  
  @ApiModelProperty("电子票据名称")
  @XmlElement(name = "EInvoiceName")
  private String EInvoiceName;
  
  @ApiModelProperty("电子票据代码")
  @XmlElement(name = "EInvoiceCode")
  private String EInvoiceCode;
  
  @ApiModelProperty("电子票据模板代码")
  @XmlElement(name = "EInvoiceSpecimenCode")
  private String EInvoiceSpecimenCode;
  
  @ApiModelProperty("业务流水号")
  @XmlElement(name = "BizCode")
  private String BizCode;
  
  @ApiModelProperty("货币种类")
  @XmlElement(name = "CurrencyType")
  private String CurrencyType;
  
  @ApiModelProperty("汇率")
  @XmlElement(name = "ExchangeRate")
  private String ExchangeRate;
  
  @XmlElement(name = "SupervisorRemark")
  @ApiModelProperty("财政部门备注")
  private String SupervisorRemark;
  
  @Data
  public static class InvoicingParty implements Serializable {
    
    @ApiModelProperty("开票单位名称")
    @XmlElement(name = "InvoicingPartyName")
    private String InvoicingPartyName;
    
    @ApiModelProperty("开票单位代码 统一社会信用代码")
    @XmlElement(name = "InvoicingPartyCode")
    private String InvoicingPartyCode;
    
    @ApiModelProperty("开票单位名称")
    @XmlElement(name = "RecName")
    private String RecName;
    
    @ApiModelProperty("收款人账号")
    @XmlElement(name = "RecAcct")
    private String RecAcct;
    
    @ApiModelProperty("收款人开户行")
    @XmlElement(name = "RecOpBk")
    private String RecOpBk;
  }
  
  @Data
  public static class PayerParty implements Serializable {
    
    @ApiModelProperty("交款人类型 1:个人 2:单位")
    @XmlElement(name = "PayerPartyType")
    private String PayerPartyType;
    
    @ApiModelProperty("交款人名称")
    @XmlElement(name = "PayerPartyName")
    private String PayerPartyName;
    
    @ApiModelProperty("交款人代码 单位一般为统一社会信用代码；个人一般为身份证号")
    @XmlElement(name = "PayerPartyCode")
    private String PayerPartyCode;
    
    @ApiModelProperty("交款人账号")
    @XmlElement(name = "PayerAcct")
    private String PayerAcct;
    
    @XmlElement(name = "PayerOpBk")
    @ApiModelProperty("交款人开户行")
    private String PayerOpBk;
  }
}
